<template>
  <div class="ThemeButton">
    <button
      @click="handleClick()"
      :style="buttonStyle"
      :class="{ disabled: disabled }"
    >
      {{ title }}
    </button>
  </div>
</template>
<script>
export default {
  name: "ThemeButton",
  props: {
    title: String,
    top: Number,
    bottom: Number,
    buttonStyle: String,
    disabled: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    handleClick() {
      if (this.disabled) {
        return false;
      }
      this.$emit("click");
    }
  }
};
</script>
<style lang="less" scoped>
.ThemeButton {
  padding: 0 36px;
  button {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-radius: 20px;
    background-image: linear-gradient(to right, #fc8cbf, #ff83a6);
    border: 0 none;
    font-size: 15px;
    line-height: 15px;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    &.disabled {
      background-image: linear-gradient(
        to right,
        greyscale(#fc8cbf),
        greyscale(#ff83a6)
      );
    }
  }
}
</style>
